var express = require('express');
var router = express.Router();

const userDao = require('../dao/userDao');


//页面跳转
router.get('/', function(req, res, next) {
    res.render('detail', { title: 'Express' });
});
//查询单条
router.get('/findById', function(req, res, next) {
    userDao.queryId(req, res, next)
});
//查询所有
router.get('/queryAll', function(req, res, next) {
    userDao.queryAll(req, res, next)
});
//更新单条
router.get('/update', function(req, res, next) {
    userDao.update(req, res, next)
});
module.exports = router;